﻿<%@ Page language="c#" Inherits="Mysoft.Crm.Web.Controls.Lookup.LookupDataPage" SmartNavigation="true" CodeBehind="Mysoft.Crm.Application.Pages.Controls.dll" %>

<html>
<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"/>
	<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
	<link rel="stylesheet" type="text/css" href="lookupdialogs.css">
	
	<script language="javascript" src="lookupdialogs.js"></script>
	
	<script language="javascript">
		_mode = <%=(uint)Mode%>;
		
		function itemDoubleClick()
		{
			if (typeof(event.srcElement.parentElement.unselectable) == "undefined")
			{
				parent.appendSelected();
			}
		}
		//	must cancel the selection
		//
		function document.onselectstart()
		{
			event.returnValue = false;
		}
		
		function window.onfocus()
		{
			tblResults.focus();
			
			if ( tblResults.rows.length > 0 ) 
			{
				if ( tblResults.selectedItems == undefined )
				{
					selectItem( tblResults, tblResults.rows[0] )
				}
				
				focusSelectedItems( tblResults, true );
			}
		}
		
		function window.onload()
		{
			if ( tblResults.rows.length > 0 )
			{
				selectItem( tblResults, tblResults.rows[0], false );
			}
		}
	</script>
</head>
<body style="border: none 0px">
	<table height="100%" width="100%" cellpadding="0" cellspacing="0">
		<%	RenderColumnHeaders(); %>
		<tr>
			<td>
				<div class="objects" style="height:100%;width:100%;<%=ExtendedStyles%>">
					<table style="table-layout: fixed;" id="tblResults" cellpadding="2" cellspacing="0" width="100%" onclick="clickItem(this)" ondblclick="itemDoubleClick()" onkeydown="listKeyDown(this)">
						<%	ExecuteQuery();	%>
					</table>
				</div>
			</td>
		</tr>
	</table>
</body>
</html>
